//
//  def_statement_list.h
//  compilation
//
//  Created by Kevin Le perf on 17/01/12.
//  Copyright (c) 2012 e2co technologie. All rights reserved.
//

#ifndef compilation_def_statement_list_h
#define compilation_def_statement_list_h

/*
 statement_list
 : statement {printf("statement_list\n");}
 | statement_list statement {printf("statement_list\n");}
 ; 
 */

struct def_statement_list{
	void * parent;
	int type;
	struct def_statement * statement;
	struct def_statement_list * statement_list;
};

struct def_statement_list * statement_list_create(void * parent){
	struct def_statement_list * s = malloc(sizeof(*s));
	s->type = 0;
	s->parent = parent;
	return s;
}

void statement_list_print(struct def_statement_list * s){
	switch(s->type){
		case 2:
			statement_list_print(s->statement_list);
		case 1:
			statement_print(s->statement);
			break;
	}
}
#endif
